﻿using Business.BookManagement.Dto;
using Business.BookManagement;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
using Business.CheckPlanManagement;
using Business.CheckPlanManagement.Dto;

namespace Business.Controllers
{
    [RemoteService]
    [Area("Business")]
    [Route("api/business/checkplan")]
    public class CheckPlanController : AbpController
    {
        private readonly ICheckPlanAppService _CheckPlanAppService;

        public CheckPlanController(ICheckPlanAppService CheckPlanAppService)
        {
            _CheckPlanAppService = CheckPlanAppService;
        }

        [HttpPost]
        [Route("data-post")]
        public Task<CheckPlanDto> CreateOrUpdate(CreateOrUpdateCheckPlanDto input)
        {
            return _CheckPlanAppService.CreateOrUpdate(input);
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>

        [HttpPost]
        [Route("delete")]
        public Task Delete(List<Guid> ids)
        {
            return _CheckPlanAppService.Delete(ids);
        }
        /// <summary>
        /// 反填
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpGet]
        [Route("{id}")]
        public Task<CheckPlanDto> Get(Guid id)
        {
            return _CheckPlanAppService.Get(id);
        }
        /// <summary>
        /// 获得全部
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpGet]
        public Task<PagedResultDto<CheckPlanDto>> GetAll(GetCheckPlanInputDto input)
        {
            return _CheckPlanAppService.GetAll(input);
        }
    }
}
